#include "histogram.h"

histogram::histogram(QWidget *parent) : QWidget(parent)
{
}

void histogram::paintEvent(QPaintEvent *p)
{
    QPainter pincel(this);
    for(int i=0;i<256;++i)
    {
        pincel.drawLine(i,112,i,112-v->gray[i]*112/v->maGray);
    }


}
